package com.yanqu.road.logic.activity.foxcard.game.effect;

import com.yanqu.road.entity.activity.foxcard.FoxBaseCard;
import com.yanqu.road.entity.activity.foxcard.FoxHandCard;
import com.yanqu.road.logic.activity.foxcard.game.FoxCardGameLogic;
import com.yanqu.road.logic.activity.foxcard.game.eFoxCardShowType;
import com.yanqu.road.logic.activity.foxcard.game.eFoxCardTriggerType;

import java.util.Collections;
import java.util.List;

/**
 * 指定buff生效增加效果卡，
 * buffid|加筹码基础值|乘筹码基础值|加倍率基础值|乘倍率基础值|金币基础值
 */
public class FoxCardEffect55 extends FoxCardEffectBase {
    @Override
    protected void effectHandle(FoxCardGameLogic gameLogic, FoxHandCard handCard) {
        if ((triggerType == eFoxCardTriggerType.BUFF_TRIGGER && handCard != null)) {
            int buffId = Integer.valueOf(effectConfig.getParamsList().get(0));
            if (handCard.getReinforceEffect() == buffId) {
                int addBaseScore = Integer.valueOf(effectConfig.getParamsList().get(1));
                int addBaseScoreMulti = Integer.valueOf(effectConfig.getParamsList().get(2));
                int addBaseMulti = Integer.valueOf(effectConfig.getParamsList().get(3));
                int addBaseMultiMulti = Integer.valueOf(effectConfig.getParamsList().get(4));
                int goldChange = Integer.valueOf(effectConfig.getParamsList().get(5));

                List<FoxBaseCard> foxEffectCards = Collections.singletonList(effectCard);
                gameLogic.addBaseScore(addBaseScore, foxEffectCards, null); //加基础筹码
                gameLogic.addBaseScoreMulti(addBaseScoreMulti, foxEffectCards, null); //当前基础筹码乘算
                gameLogic.addBaseMulti(addBaseMulti, foxEffectCards, null); //加基础倍率
                gameLogic.addBaseMultiMulti(addBaseMultiMulti, foxEffectCards, null); //当前基础倍率乘算
                gameLogic.goldChange(goldChange, foxEffectCards, null, triggerType); //加金币
            }
        }
    }
}
